<template>
	<view>
		<web-view v-if="type=='web'" :src="url"></web-view>
		<video  ref="my_video" v-if="type=='video'" class="video" :autoplay="true" :src="url" @fullscreenchange="chageVideoScreen" @ended="handelrVideoEnd"></video>
	</view>
</template>

<script>
	// 此页仅仅是为了避免ios 网页back时无法触发onshow
	export default{
		data(){
			return{
				url:'',
				type:'web'
			}
		},
		methods:{
			handelrVideoEnd(){
				// uni.setStorageSync('vStatus',true)
				this.$store.dispatch('setTaskVideoStatus',true)
			},
			chageVideoScreen(e){
				//兼容安卓部分APP点击无反应 手动调用
				const isFullscreen=e.detail.fullScreen;
				if(isFullscreen){
					try{
						wrappedFscrFunc()
					}catch(e){
					    
					}
				}else{
				}

			},
		},
		onLoad(op) {
			this.url = op.url
			if(op.type)this.type=op.type
		}
	}
</script>

<style lang="scss" scoped>
	.video{
		width: 100vw;
		height: 100vh;
	}
</style>